$OpenBSD: patch-lib_src_ruby_api_cc,v 1.5 2015/07/23 08:06:28 jasper Exp $

- Initialize the ruby loadpath so that rbconfig.rb gets loaded.
  https://github.com/puppetlabs/facter/pull/1059

--- lib/src/ruby/api.cc.orig	Tue Jul 21 11:31:28 2015
+++ lib/src/ruby/api.cc	Thu Jul 23 01:25:11 2015
@@ -96,6 +96,7 @@ namespace facter { namespace ruby {
         LOAD_SYMBOL(ruby_init),
         LOAD_SYMBOL(ruby_options),
         LOAD_SYMBOL(ruby_cleanup),
+        LOAD_SYMBOL(ruby_init_loadpath),
         _library(move(library))
     {
     }
@@ -155,6 +156,8 @@ namespace facter { namespace ruby {
         } else {
             ruby_init();
         }
+
+        ruby_init_loadpath();
 
         LOG_INFO("using ruby version %1% to resolve custom facts.", to_string(rb_const_get(*rb_cObject, rb_intern("RUBY_VERSION"))));
 
